import 'package:flutter/material.dart';
import 'package:flutter_mode/utils.dart';
import 'package:flutter_mode/zjw/DataTransfer.dart';
import 'package:flutter_mode/zjw/muti_widget.dart';
import 'package:flutter_mode/zjw/single_widget.dart';
import 'package:flutter_mode/zjw/text_input.dart';

class MyAppZJW extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.green,
      ),
      home: MainZjw(),
    );
  }
}

class MainZjw extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    Widget list = ListView(
      children: <Widget>[
        new ElevatedButton(
            onPressed: () {
              Navigator.push(context,
                  MaterialPageRoute(builder: (context) => SingleWidget()));
            },
            child: new Text('单节点控件')),
        new ElevatedButton(
            onPressed: () {
              Navigator.push(context,
                  MaterialPageRoute(builder: (context) => MutiWidget()));
            },
            child: new Text('多节点控件')),
        new ElevatedButton(
            onPressed: () {
              Navigator.push(context,
                  MaterialPageRoute(builder: (context) => InputWidget()));
            },
            child: new Text('文本输入')),
        ElevatedButton(
          onPressed: () => pushMaterial(context, DataTransferWidget()),
          child: Text('数据传递'),
        )
      ],
    );
    return Scaffold(
      appBar: new AppBar(
        title: new Text('good good study,day day up!'),
      ),
      body: list,
    );
  }
}
